
package com.yami.shop.bean.enums;

/**
 * 1.订单催付 2.付款成功通知 3.商家同意退款 4.商家拒绝退款 5.核销提醒  6.发货提醒  7.拼团失败提醒 8.拼团成功提醒 9.拼团开团提醒 10.开通会员提醒
 * 11.余额退款成功提醒
 * 101.退款临近超时提醒 102.确认收货提醒 103.买家发起退款提醒 104.买家已退货提醒
 * @author lhd
 * @date 2020-08-27 17:55:57
 */
public enum SendType {
    /**
     * 自定义消息
     */
    CUSTOMIZE(0, 0,"自定义消息", null, null),
    /**
     * 订单催付
     */
    PRESS_PAY(1, 1,"订单催付", null, null),

    /**
     * 付款成功通知
     */
    PAY_SUCCESS(2, 1,"付款成功通知", null, null),

    /**
     * 商家同意退款
     */
    AGREE_REFUND(3, 1,"商家同意退款", null, null),

    /**
     * 商家拒绝退款
     */
    REFUSE_REFUND(4, 1,"商家拒绝退款", null, null),

    /**
     * 核销提醒
     */
    WRITE_OFF(5, 1,"核销提醒", null, null),

    /**
     * 发货提醒
     */
    DELIVERY(6, 1,"发货提醒", null, null),

    /**
     * 拼团失败提醒
     */
    GROUP_FAIL(7, 1,"拼团失败提醒", null, null),

    /**
     * 拼团成功提醒
     */
    GROUP_SUCCESS(8, 1,"拼团成功提醒", null, null),

    /**
     * 拼团开团提醒
     */
    GROUP_START(9, 1,"拼团开团提醒", null, null),

    /**
     * 会员升级通知
     */
    MEMBER(10, 1,"会员升级通知", null, null),

    /**
     * 退款临近超时提醒
     */
    REFUND_OUT_TIME(11, 1,"退款临近超时提醒", null, null),
    /**
     * 用户注册验证码
     */
    REGISTER(12, 1,"用户注册验证码", null, null),
    /**
     * 发送登录验证码
     */
    LOGIN(13, 1,"发送登录验证码", null, null),
    /**
     * 修改密码验证码
     */
    UPDATE_PASSWORD(14, 1,"修改密码验证码", null, null),
    /**
     * 身份验证验证码
     */
    VALID(15, 1,"身份验证验证码", null, null),
    /**
     * 订单退款到余额提醒
     */
    ORDER_REFUND_TO_BALANCE(16, 2,"订单退款到余额提醒", null, null),

    /**
     * 设置支付密码验证码
     */
    SET_PAY_PASSWORD(17, 1, "设置支付密码验证码", null, null),

    /**
     * 功能描述: 注销验证码
     * @Author: LSR
     * @Date: 2023/3/20 17:06
     */
    CANCEL(18, 1, "注销验证码", null, null),

    /**
     * 商家购买gas支付验证码
     */
    PAYMENT(19,1,"购买GAS验证码",null,null),

    /**
     * 动态驳回消息
     */
    BLOG_REJECT(40, 3, "动态驳回消息", null, null),

    /**
     * 超级群到期提示消息
     */
    ULTRA_GROUP_EXPIRATION(41, 3, "超级群到期提醒", null, null),

    /**
     * 举报
     */
    REPORT_REMINDER(45, 3, "举报消息", null, null),

    /**
     * 转赠
     */
    SUBGIFT(50, 3, "转赠消息", null, null),


    /**
     * ********************************用户系统消息 50 以内***********************************
     */

    /**
     * 点赞
     */
    LIKES_REMINDER(51, 3, "点赞消息", null, null),

    /**
     * 收藏
     */
    COLLECTION_REMINDER(52, 3, "收藏消息", null, null),

    /**
     * 评论
     */
    COMMENT_REMINDER(53, 3, "评论消息", null, null),


    /**
     * 关注
     */
    FOLLOW_REMINDER(54, 3, "关注消息", null, null),
    
    /**
     * 确认收货提醒
     */
    RECEIPT_ORDER(102, 2,"确认收货提醒", "订单", "用户确认收货后"),

    /**
     * 买家发起退款提醒
     */
    LAUNCH_REFUND(103, 2,"买家发起退款提醒", "订单", "用户申请售后，需要商家处理"),

    /**
     * 买家已退货提醒
     */
    RETURN_REFUND(104, 2,"买家已退货提醒", "订单", "买家已退货"),

    /**
     * 用户支付成功，发送给卖家
     */
    USER_PAY_SUCCESS(105, 2, "待发货提醒", "订单", "用户支付成功后,需要发货"),

    /**
     * 商品下架提醒
     */
    PRODUCT_OFFLINE(106, 2,"商品下架提醒", "商品", "平台下架商品后"),

    /**
     * 商品审核结果提醒
     */
    PRODUCT_AUDIT(107, 2,"商品审核结果提醒", "商品", "平台审核商品后"),

    /**
     * 待采购提醒
     */
    TO_PURCHASE(108, 2,"待采购提醒", "订单", "用户的实付金额低于供货价，这笔订单转成待采购订单时会给商家提醒"),


    /**
     * 待收货提醒
     */
    TO_RECEIPT_ORDER(109, 2,"待收货提醒", "订单", "用户将商品退回后，需要签收"),

    /**
     * 营销活动下架
     */
    ACTIVITY_OFFLINE(110, 2,"营销活动下架", "营销活动", "平台下架营销活动后"),

    /**
     * 活动审核结果提醒
     */
    ACTIVITY_AUDIT(111, 2,"活动审核结果提醒", "营销活动", "平台审核营销活动后"),



    /**
     * 超级群到期提示消息
     */
    ULTRA_GROUP_EXPIRATION_SHOP(112, 3, "超级群到期提醒", "群聊", "超级群到期前2天通知"),

    ;

    private Integer value;
    /**
     * 0.自定义消息 1.发送给买家，2.为发送给卖家
     */
    private Integer type;
    private String desc;
    private final String menu;
    private final String nodeName;
    public Integer getType() {
        return type;
    }
    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }
    public String getMenu() {
        return menu;
    }

    public String getNodeName() {
        return nodeName;
    }

    SendType(Integer value,Integer type, String desc, String menu, String nodeName) {
        this.value = value;
        this.type = type;
        this.desc = desc;
        this.menu = menu;
        this.nodeName = nodeName;
    }

    public static SendType instance(Integer value) {
        SendType[] enums = values();
        for (SendType statusEnum : enums) {
            if (statusEnum.getValue().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
}
